#ifndef __INETADRESS_H__
#define __INETADRESS_H__
#include <arpa/inet.h>
#include <string>
using std::string;

class InetAddress
{
public:
    InetAddress(const string &ip, unsigned short port);
    InetAddress(const struct sockaddr_in addr);
    ~InetAddress();
    string getIp();
    unsigned short getPort();
    struct sockaddr_in *getAddrPtr();

private:
    struct sockaddr_in _addr;
};

#endif